The present invention relates generally to the field of tape drives, and more particularly to tape drives that store data on a tape medium by intermittently “flushing” (that is, communicating data from a buffer memory to the tape medium).
It is known to write computer data on tape mediums by tape drives so that: (i) there are multiple, parallel longitudinally oriented tracks running along the length of the tape medium (for example, across the entire length of the tape medium, or across a substantial portion of the length of the tape medium); and (ii) each track has sequentially stored data (for example, a series of stored computer files). Some known tape drives only write to/read from a single track at a time. In some of these multiple, parallel track type tape drive systems, when the buffer memory is flushed, then at least some of the data in the buffer may need to be stored at temporary locations on the tape until it is determined where the data will be “permanently stored” (that is, stored until it is desired to delete or move the data for some reason unrelated to flushing the buffer). (See definitions of “permanent” and “temporary,” below, in the Definitions section of this document.) For example, if the buffer memory contains portions of several different larger data streams or segments of data streams, then these portions are stored temporarily on the tape during the flush operation, and, when there is a convenient time, read from the tape and re-stored on the tape medium so that each data stream or segments of a data stream is re-assembled from its temporarily stored pieces and permanently stored so that each data stream or segments of a data stream is stored in a continuous (or at least relatively continuous) manner.
In tape drives, forward direction tracks or “wraps” (that is, tracks intended to generally have data sequentially written on them in a first longitudinal direction) alternate with reverse direction wraps (that is, tracks intended to generally have data sequentially written on them in a second longitudinal direction that is the reverse of the first direction). This alternation of forward and backward direction tracks tends to reduce seek time in normal read/write operations of the tape drive. For example, if the end of a track is reached in the middle of sequential data for a data stream or segments of a data stream, then that data stream or segments of a data stream can be continued to be stored on a reverse track that begins at the same longitudinal end of the tape medium where the recording was interrupted by virtue of the fact that the end of the forward direction track was reached. There are 4 data bands on the tape. On each data band, data is written as described in this section. Even more specifically, in typical type tape drive systems, a data stream or segments of a data stream that is being written to the outermost forward direction wrap (that is along one transverse edge of a data band on the tape medium) will be continued along the outermost reverse direction wrap running along the opposite transverse edge of a data band on the tape medium. In these embodiments, the storage of permanently stored data proceeds wrap by wrap from the transverse edges of a data band on the tape medium (or a given data band of a multiple data band tape medium) towards the center of a data band on the tape medium (or a given data band of a multiple data band tape medium).
One known type of multiple, parallel track tape drive system that temporarily stores pieces of data for later is called recursive accumulating backhitchless flush (RABF) type tape drive system. To explain RABF in more detail, in a typical RABF operation, a controller of the tape drive first writes data in a buffer. The tape drive receives a synchronization request and the tape drive writes the data from the buffer to a temporary recording area on the tape, with the tape continuously traveling. Simultaneously, the controller recursively accumulates data in the buffer and writes back the data to a normal recording area when either the buffer or the temporary recording area becomes full. Therefore, an RABF synchronization does not need a backhitch for subsequent synchronizations and the time required for synchronization can be reduced. Typically, an RABF controller detects a pattern of synchronizing events for received data records to be written to tape. The RABF controller writes each transaction data records to the magnetic tape, accumulates the synchronized transactions in a buffer, and subsequently recursively writes the accumulated transactions of data records from the buffer to the tape in a sequence. A single backhitch may be employed to place the recursively written accumulated data records following the preceding data. This recursive writing operation may also be known as a “flush.”
In typical RABF type tape drive systems, when there is a synchronization operation (that is, data from the buffer is temporarily stored at a temporary location on the magnetic tape until the various data stream or segments of a data stream can be assembled in their “permanent” order), data corresponding to pieces of various data stream or segments of a data stream are typically temporarily stored in a static manner at the innermost wraps of a data band currently being recorded to, as will be discussed in more detail, below.
File is a concept of a file system. When an application program running on the server writes a file to a storage device, the file is divided into multiple blocks with a certain size. A storage device receives by a unit of block (or record) per every write command. In the case of a tape drive, it compresses the records into a small piece and packs it on to the memory buffer (segment buffer). Once the packed size reaches a certain size, the chunk is called a data set which is the minimum unit to read/write to the tape medium. One of the triggers for the drive to flush the data sets on the buffer to the tape is when the number of data sets exceeds a certain number.
The following is a brief explanation of how RABF works. On a segment buffer, each data set is called a segment. During normal operations, the drive writes data on the original wrap. Once an RABF trigger occurs, the drive moves the recording head to the ABF wrap. The drive writes data sent from the host to the tape on the ABF wrap even though the size is smaller than a data set. Once the next data is sent, the drive appends the data next to the last end of the previous data on a segment, then writes the segment to the tape. Once the size of the accumulated exceeds the size of a data set (a segment), the tape drive proceeds to the next segment. Here a segment is written to the tape as a data set, but the segment is kept in the buffer. This operation is called as an “accumulating backhitchless flush”. Once half of the segments in the buffer are filled with data segments, the drive positions the recording head over the second ABF wrap and reverses direction. When the segment buffer is nearly full, the drive terminates the accumulation mode and moves the recording head back to the original wrap. The drive flushes the segments in the buffer to the tape on the original wrap. In this case, the drive does not read back the data from the tape but uses the segments accumulated in the buffer. This operation is called as a “recursive writing”.
RABF operations allows the tape to keep running on the tape drive while the host sends data to the drive. During normal Non-RABF tape drive operations, when the drive flushes the whole data to the tape intentionally by writing a file mark, the buffer is empty. The host sends the subsequent data to the tape drive, but it takes some time until several segments are filled. Once several segments are filled in the buffer, the drive starts writing data to the tape. While the buffer was accumulating segments of data from the host, the tape drive kept the tape moving and the tape position is precisely adjacent to the previous data segment. To avoid leaving unused gaps of data storage space on the tape medium, the tape drive backhitches the recording head/tape medium position to the precisely adjacent tape position to the previous data segment. RABF assists in avoiding unused tape medium data storage while reducing the frequency of backhitches by moving the recording head over the ABF wrap on the tape to continue writing while data accumulates in the buffer, because the drive cannot return the READY status to the host. Once the READY status is returned, the host can send the subsequent data to tape drive buffer.